﻿using System.Data;

namespace TurtleEngine
{
	 /// <summary>
	 ///
	 /// </summary>
	 public class ColumnsHelper
	 {
		  /// <summary>
		  /// The columns
		  /// </summary>
		  private static DataTable columns = new DataTable("Columns");

		  /// <summary>
		  /// Gets the columns.
		  /// </summary>
		  /// <value>
		  /// The columns.
		  /// </value>
		  public static DataTable Columns
		  {
				get { return columns; }
		  }

		  /// <summary>
		  /// Gets the columns.
		  /// </summary>
		  public static void GetColumns()
		  {
				columns.Clear();
				columns = Utility.DBConnection.GetSchema("Columns");

				//Utility.PrintDatatable(columns);
		  }

		  /// <summary>
		  /// Writes the columns.
		  /// </summary>
		  public static void WriteColumns()
		  {
				Utility.WriteXML(columns, columns.TableName + ".xml");

				//Utility.PrintDatatable(columns);
		  }
	 }
}